|
|
|
|
|
|
|
' show list
MsgBox strMsg, vbInformation, "Deleted Field"
'
' clean up
db.Close
ws.Close
Set fl = Nothing
Set td = Nothing
Set db = Nothing
Set ws = Nothing
'
End Sub |
|
|
|
|
|
|
|
|
In Listing 9.16, you call the previous code section to create the table again. Then you add a new field using the Append method, and delete that field using the Delete method. Save and run the project, and check your final results against Figure 9.15. |
|
|
|
|
|
|
|
|
Figure 9.15.
The results of adding
and deleting fields. |
|
|
|
|
|
|
|
|
You can attach an existing external, non-Microsoft Jet database table to an existing Microsoft Jet-format database. Attaching tables in this way gives you access to the external data using the standard Visual Basic data-access object interface. It also enables you to mix Microsoft Jet and non-Microsoft Jet data in the same database, which is great for handling queries that combine data from both sources. |
|
|
|
|
| |
|
|
|
|
You can create and store queries on the attached external data, too. Queries are covered later in this chapter. |
|
|
|
|
|
|
|
|
|
|
You cannot open a table-type Recordset on an attached table. You must use the Dynaset or Snapshot objects for accessing attached tables. Even though you must use Dynaset data objects, attached tables respond faster than external data links. |
|
|
|
|
|